package com.cgsd.heyu.ui.home.fragment;

import com.android.library.utils.BeanUtils;
import com.cgsd.heyu.R;
import com.cgsd.heyu.entity.RewardEntity;
import com.cgsd.heyu.entity.TaskEntity;
import com.cgsd.heyu.http.ErrorMessage;
import com.cgsd.heyu.presenter.home.HomeContract;
import com.cgsd.heyu.ui.BaseFragment;

import java.util.List;

/**
 * Author：sky on 2021/3/19 17:22.
 * Email：xcode126@126.com
 * Desc： home page
 */
public class HomeFragment extends BaseFragment implements HomeContract.ClassifyView {

    private HomeContract.Presenter mPresenter;

    public static HomeFragment newInstance() {
        return new HomeFragment();
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.common_recycler;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
//        setTaskVisible(CommonConfig.getInstance().isShowDayTask);
        mPresenter.getTodayTask();
        mPresenter.getConfigInfo(null);
    }

    @Override
    public void setTaskList(List<TaskEntity> taskList) {

    }

    @Override
    public void taskRewordSuccess(RewardEntity entity) {

    }

    @Override
    public void setConfig(String sysType) {

    }

    @Override
    public void setPresenter(HomeContract.Presenter presenter) {
        mPresenter = BeanUtils.checkNotNull(presenter);
    }

    @Override
    public void setErrorMessage(ErrorMessage error) {

    }
}
